* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --success: #4cc9f0;
    --border-radius: 10px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    transition: var(--transition);
}

body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
    --light: #1e1e1e;
    --dark: #f5f5f5;
    --light-gray: #2d2d2d;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background-color: var(--primary);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--box-shadow);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--success);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

nav a:hover, nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-container {
    position: relative;
}

.search-container input {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border-radius: 50px;
    border: none;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    width: 200px;
    transition: var(--transition);
}

.search-container input:focus {
    outline: none;
    width: 250px;
    background-color: rgba(255, 255, 255, 0.3);
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.theme-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 页脚样式 */
footer {
    background-color: #1a1a1a; /* 深色背景 */
    color: #e0e0e0;
    padding: 3rem 0 1.5rem;
    transition: var(--transition);
}

.dark-mode footer {
    background-color: #0d0d0d; /* 更深的背景色 */
    border-top: 1px solid #333;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    color: #ffffff; /* 白色标题 */
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--success);
}

.footer-widget p {
    margin-bottom: 1rem;
    color: #b0b0b0; /* 浅灰色文字 */
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--success);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.footer-links li:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.footer-links li:last-child {
    border-bottom: none;
}

.footer-links a {
    color: #cccccc; /* 浅灰色链接 */
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 0.3rem 0;
}

.dark-mode .footer-links a {
    color: #b0b0b0; /* 在黑暗模式下稍亮一点 */
}

.footer-links a:hover {
    color: var(--success);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999; /* 灰色版权文字 */
    font-size: 0.9rem;
}

.dark-mode .copyright {
    color: #777; /* 在黑暗模式下稍亮一点 */
}

/* 响应式设计 */
@media (max-width: 900px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 600px) {
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-container input {
        width: 150px;
    }
    
    .search-container input:focus {
        width: 180px;
    }
    
    .hero {
        padding: 3rem 0;
    }
}